SRCS:=$(wildcard *.c)
OBJECTS:=$(patsubst %.c, %.o, $(SRCS))
CC:=gcc
LIBS:=-lpthread
LCR:=-lcrypt
LSQL:=-lmysqlclient
SERVER:=server


$(SERVER):$(OBJECTS)
		$(CC) $^ -o $@  $(LIBS) $(LCR) $(LSQL) -g

%.o:%.c
		$(CC) -c $^ -o $@ $(LIBS) $(LCR) $(LSQL) -g
print:
		echo $(OBJECTS)
clean:
		rm -rf $(OBJECTS) 


